<template>
   <Swiper>
        <Swiper-Item v-for="(item,i) in lunbodata" :key="i">
             <a :href="item.link">
             <img :src="item.image" alt="轮播图" @load="swiperImageLoad">
             </a>
        </Swiper-Item>
    </Swiper>
</template>

<script>
import {Swiper, SwiperItem} from 'components/common/swiper'
export default {
    name:'HomeSwiper',
    components:{
        Swiper,
        SwiperItem
    },
    props:{
      lunbodata:{
         type: Array,
         default(){
           return []
         }
      }
    },
    data() {
      return {
         isLoad: false
      }
    },
    methods:{
       swiperImageLoad() {
         if(!this.isLoad) {
          this.$emit('swiperLoad')
        }
          this.isLoad = true
       }
      
    }
}
</script>

<style>
</style>